package com.cmpe451.nutty.so;

import java.util.Collection;
import java.util.HashSet;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;


public class GuiUser implements UserDetails {
	private static final long serialVersionUID = 1L;

	private long id;
	private String username;
	private String email;
	private String password;
	private Long level_point;
	private String title;
	private Long level_max_point;
	private Long level_min_point;
	private String hometown;
	private boolean enabled = true;
	private HashSet<GrantedAuthority> authorities = new HashSet<GrantedAuthority>();

	public void setUsername(String username) {
		this.username = username;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Override
	public Collection<GrantedAuthority> getAuthorities() {
		return authorities;
	}

	public void setAuthorities(HashSet<GrantedAuthority> authorities) {
		this.authorities.clear();
		this.authorities.addAll(authorities);
	}

	@Override
	public String getPassword() {
		return password;
	}

	@Override
	public String getUsername() {
		return username;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Override
	public boolean isAccountNonExpired() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean isAccountNonLocked() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean isCredentialsNonExpired() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean isEnabled() {
		return enabled;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public Long getLevel_point() {
		return level_point;
	}

	public void setLevel_point(Long level_point) {
		this.level_point = level_point;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Long getLevel_max_point() {
		return level_max_point;
	}

	public void setLevel_max_point(Long level_max_point) {
		this.level_max_point = level_max_point;
	}

	public Long getLevel_min_point() {
		return level_min_point;
	}

	public void setLevel_min_point(Long level_min_point) {
		this.level_min_point = level_min_point;
	}

	public String getHometown() {
		return hometown;
	}

	public void setHometown(String hometown) {
		this.hometown = hometown;
	}
	
}
